package main

import "fmt"
import "reflect"

type Response struct {
	ErrorID int         
	Data    interface{}
}

type People struct {
	name string
	age int
}

type Man People

func (p* People) show() {
	fmt.Println(*p)
}
func test() *int {
	a := 1
	return &a
}

func main() {
	var a People
	fmt.Println("====", &a)
	var bob People = People{name : "bob", age : 1}
	keyInfo := reflect.TypeOf(bob)
	valueInfo := reflect.ValueOf(bob)
	for k := 0; k < keyInfo.NumField(); k++ {
		key := keyInfo.Field(k).Name
		val := valueInfo.Field(k).Interface()

		fmt.Printf("%T --- %v\n", key, key)
		fmt.Printf("%T --- %v\n", val, val)
	}


	/*
	var bob People = People{name : "bob", age : 1}
	bob.show()
	var amy *People = &People{name : "amy", age : 1}
	amy.show()

	x := 0x010
	fmt.Printf("%#x", x)

	fmt.Println(*test())
	*/
	return
}
